<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div  data-toggle="cxselect" data-selects="first,second">

        <div style="display: none" class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Company')}:</label>
            <div class="col-xs-12 col-sm-8">
                <select id="c-company"  class="first form-control" name="row[company]" data-url="robot/model/getCompanyList">
                    <option value="{$row.company|htmlentities}" selected=""></option>
                </select>
            </div>
        </div>

        <div  class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Company')}:</label>
            <div class="col-xs-12 col-sm-8">

                {foreach name="companyList" item="vo"}
                {php}
                    if($key == $row['company']){
                {/php}
                <input disabled class="form-control" type="text" value="{$vo}" />
                {php}
                }
                {/php}
                {/foreach}


            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('Model_tag')}:</label>
            <div class="col-xs-12 col-sm-8">
                <select id="c-model_tag" class="second form-control" name="row[model_tag]" data-url="robot/model/getModelList" data-query-name="company">
                    <option value="{$row.model_tag|htmlentities}" selected=""></option>
                </select>
            </div>
        </div>
    </div>


    <input id="c-model_class"  class="form-control" name="row[model_class]" type="hidden" value="{$row.model_class|htmlentities}">

    <div style="display: none" class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Appkey')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-appkey" data-rule="length(~32)" class="form-control" name="row[appkey]" type="text" value="{$row.appkey|htmlentities}">
        </div>
    </div>
    <div style="display: none" class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Appsecret')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-appsecret" data-rule="length(~32)" class="form-control" name="row[appsecret]" type="text" value="{$row.appsecret|htmlentities}">
        </div>
    </div>
    <div style="display: none" class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Appid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-appid" data-rule="length(~32)" class="form-control" name="row[appid]" type="text" value="{$row.appid|htmlentities}">
        </div>
    </div>
    <div style="display: none" class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Authorization')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-authorization" data-rule="length(~128)" class="form-control" name="row[authorization]" type="text" value="{$row.authorization|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Api地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-api_url" data-rule="url,length(~128)" class="form-control" name="row[api_url]" type="text" value="{$row.api_url|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Temperature')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-temperature" data-rule="required,range(~0.9)" class="form-control" name="row[temperature]" type="number" value="{$row.temperature|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
